Bayesian Calibration of PM4Sand Model using Cyclic Direct Simple Shear Test Data¶
Problem files |
Problem description¶
Consider now the observations of the Cyclic Direct Simple Shear (CyDSS) experiment in below table, that are publicly available on the DesignSafe data depot. The observed count of cycles at different Cyclic Shear Stress Ratio (CSR) values can be predicted by the simulation model. Bayesian analysis assumes that the discrepancy between the optimal model prediction and experiments can be described as a Gaussian noise, capturing various inaccuracies such as inherent uncertainty in the phenomenon, the imperfection of our simulation model, and measurement error.
Cyclic Shear Stress Ratio (CSR) |
Number of Cycles to Onset of Liquefaction |
---|---|
0.105 |
26 |
0.105 |
21 |
0.130 |
13 |
0.151 |
5 |
0.172 |
4 |
0.200 |
3 |
The prior distribution of the parameters is in the below Table.
Parameter |
Distribution |
Range |
---|---|---|
Dr |
Uniform |
0.1 - 0.6 |
Go |
Uniform |
200 - 2000 |
hpo |
Uniform |
0.01 - 5 |
The goal is to obtain the samples of the posterior distribution of PM4Sand parameters that will closely reproduce the experimental results while accounting for the model and measurement uncertainties. Following best practices, the algorithm introduces inverse Gamma priors with the shape parameter alpha = 3 and scale parameter beta = 2 for the measurement variances. The posterior sample of the three PM4Sand parameters is obtained using the transitional Markov chain Monte Carlo (TMCMC) sampling technique that is available in the UCSD-UQ engine. This is an expensive calculation that greatly benefits from the available HPC resources at DesignSafe.
Files required¶
Calibration data file (Ottawa_F65_CalibrationFile.txt). The file contains 6 values representing the number of cycles to onset of liquefaction, given different CSR values, according to Table 1:
26 21 13 5 4 3
An opensees simulation model that reproduces the CyDSS test for CSR of [0.105, 0.105, 0.130, 0.151, 0.172, 0.200]: AnalysisScript.tcl and DSS_quad_DispControlModified.tcl
UQ workflow¶
The steps involved are as follows:
Start the application and the UQ panel will be highlighted. Select
Bayesian Calibration
andUSCD-UQ
. Import the calibration file.

Next select the FEM panel from the input panel selection. This will default to the OpenSees FEM engine. In the Input Script field, enter the path to the
AnalysisScript.tcl
file or select Choose and navigate to the file. Only the main file needs to be imported and other supplementary files can be located at the same directory.

Next select the RV tab from the input panel and define prior distributions.
In the QoI panel denote that the output variable names. The length of the entries mush sum up to six, matching the length of simulation model output and the length of observation dataset.
Once ready, let us run the job remotely on DesignSafe HPC cloud computer. Note that you can also run the job locally, but it will take several hours, depending on the computer spec. The remote run will take only a few minutes. To run a remote job, the user first need to request a job allocation by submitting a ticket at DesignSafe website. Navigate to DesignSafe webpage, click
Help
-Submit
a Ticket, and request an allocation to run SimCenter tools. Once the allocation name is identified, the user can run the analysis by clicking the RUN at DesignSafe button and filling in the below entries.

RUN at DesignSafe window¶
FINISHED
, left-click the corresponding row and click Retrieve Data
GET from DesignSafe window¶
The final samples of the posterior distribution are be displayed at RES tab. The Summary tab displays the summary statistics of the posterior parameter/predictive distributions. The Log tab displays the log message from the analysis. The Data Values tab shows the samples from the target posterior distribution.

RES (Summary) tab¶

RES (Log) tab¶

RES (Data Values) tab¶
Under the Data Values tab, click Save Columns Separately button to save the samples of each RV of the posterior distribution. This can later be imported into quoFEM to replace the definition of random variables.
Post-processing script¶
The detailed and intermediate analysis results can be retrieved from the remote working directory. The remote working directory can be found by looking at preference windows, which can be found by clicking file
-preference
in the quoFEM menu bar. For example, the file named ‘dakotaTab.out’ contains the posterior sample values shown in the Data Values tab in the user interface RES tab and ‘dakotaTabPrior.out’ contains the samples from the prior distribution. You can create your own visualization script using these files. Below is an example of such a python script, that plots the pair-wise scatter plots of the samples to understand the shape of the posterior distribution and especially, the correlation between the samples. Note that {YOUR/PATH/TO/REMOTEWORKDIR}
in line 4 should be replaced with your remote working directory, found in your preference window.
1import pandas as pd
2import seaborn as sns
3
4Path_to_RemoteWorkDir = r"{YOUR/PATH/TO/REMOTEWORKDIR}"
5
6# Replace these filenames with the results from your run
7prior_file = Path_to_RemoteWorkDir+"/results/dakotaTabPrior.out"
8posterior_file = Path_to_RemoteWorkDir+"/results/dakotaTab.out"
9
10data_post = pd.read_csv(posterior_file, delimiter = '\t', usecols = [2,3,4])
11data_post['Distribution'] = 'Posterior'
12data_pri = pd.read_csv(prior_file, delimiter = '\t', usecols = [2,3,4])
13data_pri['Distribution'] = 'Prior'
14
15sns.set(font_scale=1.5)
16combine = pd.concat([data_pri,data_post], ignore_index=True)
17g = sns.pairplot(combine, hue = "Distribution", markers=".", corner=True, palette={'Prior':'red', 'Posterior':'blue'})

PM4Sand model parameters sampled from the joint prior and posterior distribution¶
- Please visit DesignSafe use case gallery to find more information on
running quoFEM on DesignSafe through jupyter-notebook (without using graphical user interface)
postprocess the results using jupyer-notebook